package minha.lista;

import java.io.File;
import java.io.FileFilter;

class ViewFilter implements FileFilter
{

  private String[] extension = { "mp3", "wav", "wmv", "flac" };

  @Override
  public boolean accept(File pathname)
  {

    if (pathname.isDirectory())
    {

      return true;

    }

    String name = pathname.getName().toLowerCase();

    for (String anExt : extension)
    {

      if (name.endsWith(anExt))
      {

        return true;

      }

    }

    return false;

  }

}